<?php
/**
 * The template for displaying Search Results pages.
 *
 * @package _s
 */

get_header(); ?>

<div class="page_width">

	<div class="article_left">
		<div class="pagebox">
			<div class="navigate_path"><a href="/">首页</a> &raquo; <span><?php printf( __( '<font color="#9563c9">"%s"</font> 的搜索结果', '_s' ), '<span>' . get_search_query() . '</span>' ); ?></span></div>
		</div>

		<div class="pagebox">
	        <ul>
	          <?php
	            //query_posts('&ignore_sticky_posts=1&cat='.$cat.'&paged='.$paged);
	            $postnun=1;
	            if(have_posts()):while(have_posts()):the_post();
	          ?>
	          <li class="articlelist">
	            <div class="thumbnail">
	              <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" target="_blank">
	                <?php
	                  $img_url = get_post_img();
	                  echo '<img src="'.$img_url.'" alt="'.$post->post_title.'" width="100" height="140" />'
	                  ?>
	              </a>
	            </div>
	            <div class="title">
	              <h1>
	                <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" target="_blank"><?php the_title(); ?>
	                </a>
	              </h1>
	              <?php if(is_sticky()){ ?>
	              <span>推荐</span>
	              <?php } ?>
	            </div>
	            <div class="info">
	            	<div style="display:inline-block">
		              <div class="category"><?php the_category();
	            	$curCat = get_the_category();
	            	echo $curCat[0]->cat_name; ?></div>
		              <!--<div class="author"><?php the_author_posts_link(); ?></div>-->
		              <div class="date">
		                <?php the_time('Y-m-d') ?>
		              </div>
		              <div class="view">
		                <?php echo getPostViews(get_the_ID()); ?>
		              </div>
		              <div class="comment">
		                <?php comments_number('0','1','%');?>
		              </div>
	            	</div>
	            </div>
	            <div class="summary">
	              <?php the_excerpt(); ?>
	            </div>
	            <!--<div class="tag"><?php the_tags(); ?></div>-->
	          </li>
	          <?php $postnun++; endwhile; else: ?>
	          <li class="articlelist">
	            <div class="nothing">抱歉，暂无相关内容！</div>
	          </li>
	          <?php endif; ?>
	        </ul>
	        <div class="page">
	        	<?php posts_pagenavi(); ?>
	        </div>
	    </div>
	</div>
	<?php get_sidebar(); ?>
</div>

<?php get_footer(); ?>